package com.alex.ioc.autowire;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Application {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("autowire.xml");

        System.out.println((Person) ctx.getBean("person1"));
        System.out.println((Person) ctx.getBean("person2"));
//        System.out.println((Person) ctx.getBean("person3"));
        System.out.println((Person) ctx.getBean("person4"));
    }
}
